function checkValidate() {
    "use strict";
    $("#userInfoForm").validate({
        rules: {
            username: "required",
            age: {
                required: true,
                min: 0,
                max: 120

            },
            sex: "required"
        },
        messages: {
            username: {
                required: "请输入用户名"
            },
            age: {
                required: "请输入年龄",
                min: "年龄必须大于0",
                max: "年龄不能大于120"
            },
            sex: "请选择性别"
        }
    });
}
$(function () {
    "use strict";
    checkValidate();
});
